package com.suse.lhw.hms.authorizaiontserver.controller;


import com.suse.lhw.hms.authorizaiontserver.config.ControllerMethodTitle;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @ProjectName: health_manage_system
 * @Package: com.suse.lhw.security
 * @ClassName: JumpController
 * @Description: java类作用描述
 * @Author: 李鸿炜
 * @CreateDate: 2021/2/1 17:48
 * @UpdateUser: 更新者
 * @UpdateDate: 2021/2/1 17:48
 * @UpdateRemark: 更新说明
 * @Version: 1.0
 */
@Controller
@RequestMapping("/jumpto")
public class JumpController {
    @RequestMapping("/hello")
    @ControllerMethodTitle("我是一个可爱的hello跳转接口")
    public String hello() {
        return "hello";
    }

    @RequestMapping("/login")
    @ControllerMethodTitle("我是一个可爱的login登录接口")
    public String toLogin() {
        return "login";
    }

    @RequestMapping("/user")
    @ControllerMethodTitle("我是一个傻逼的user接口")
    public String toUser() {
        return "user";
    }


    @RequestMapping("/admin")
    @PreAuthorize("hasAuthority('usertest')")
    public String toAdmin() {
        return "admin";
    }

    @RequestMapping("/nopermission")
    @ControllerMethodTitle("我是一个傻逼的没有权限的显示接口")
    public String toNoPermissionDIYPage() {
        return "returnPage/NoPermission";
    }

}
